package com.tuling.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.tuling.service.IndexService;

@Controller
public class IndexController {
	
	@Autowired
	private IndexService service;

	@ResponseBody
	@RequestMapping(value="index", method=RequestMethod.GET)
	public Map<String,Object> index(@RequestParam("userId")String userId){
		return service.getUser(userId);
	}
}
